<style>
.fav-list li p{margin-bottom:10px;line-height: 20px;}
.remove{display:inline-block;background-color:#3891CA;color:#fff;padding:4px 10px;}
</style>


<div>
	<div style="float:left;width:200px;">
		<?php n_mod('user')->sidebar();?>
	</div>
	<div style="margin-left:210px;">
		<dl class="n-box">
			<dt class="n-box-head"><b>编辑榜单：<?=$data['diyInfo']['diyname']?></b></dt>
			<dd class="n-box-body">

				<ul class="fav-list">
				
				<?php foreach ($data['cartDetails'] as $wxInfo):?>
					<li class="a-bottom-line" style="margin:10px 0px;padding:10px 0px;min-height: 130px;">
						<div style="float:left;width:100px;text-align: center;">
							<a href="<?=n_url('weixin','detail',array('wxid'=>$wxInfo['wxid']))?>" target="_blank">
								<img src="<?=get_weixin_face($wxInfo['wxid'])?>"><br />
								<?=$wxInfo['wxid']?><br />
								<?=$wxInfo['wxname']?><br />
							</a>
						</div>
						<div class="n-right">
							<input class="mpdiy" type="checkbox" name="mydiy" value="<?=$wxInfo['wxid']?>" />
						</div>
						<div style="margin:0px 120px;">
							<p>
								<b>分类：</b><?=$wxInfo['groupNameFirst']?> - <?=$wxInfo['groupName']?><br />
							</p>
							<p>
								<b>描述：</b><?=$wxInfo['description']?>
							</p>
							<p>
								<b>认证：</b><?=$wxInfo['auth']?>
							</p>
						</div>
					</li>
				<?php endforeach;?>
				</ul>
				<div class="n-sep-top" style="text-align:right;">
					<button id="generagerank">生成榜单</button>
					
				</div>


			</dd>
		</dl>
	</div>
</div>


<script type="text/javascript">
$(document).ready(function() {
	$('#generagerank').click(function() {
		wxIds = {};
		count = 0;
		$('.mpdiy').each(function() {
			if ($(this).is(':checked')) {
				wxIds[count] = $(this).val();
				count++;
			}
		})
		if (count > 0)
			$.post(
				'/mprank/diyEditWxid.html',
				{wxIds:JSON.stringify(wxIds), diyId:<?=$data['diyInfo']['id']?>},
				function(data) {
					window.location.href = '/mprank/show.html?diyId=<?=$data['diyInfo']['id']?>';
				}
			)
	})
})
</script>

